package com.hospital.spd.pojo;

import java.util.Date;
import java.util.Optional;

/**
 * 请求参数封装类
 * @author 97261
 */
public class PaginationRequestParamsQuery {
    private Integer page;
    private Integer limit;
    private String startTime;
    private String endTime;
    private String goodsName;
    private String goodsCode;

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("PaginationRequestParamsQuery{");
        sb.append("page=").append(page);
        sb.append(", limit=").append(limit);
        sb.append(", startTime='").append(startTime).append('\'');
        sb.append(", endTime='").append(endTime).append('\'');
        sb.append(", goodsName='").append(goodsName).append('\'');
        sb.append(", goodsCode='").append(goodsCode).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsCode() {
        return goodsCode;
    }


    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public Integer getPage() {
        if (page == null) {
            page = 1;
        }
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {

        if (limit == null) {
            limit = 20;
        }
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }


}
